package com.springcloudconfig;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import com.springcloudconfig.config.MyRule;

@EnableDiscoveryClient // 对服务发现进行激活，用来动态获取 eureka server 路径
@EnableEurekaClient
@SpringBootApplication
@RibbonClient(name = "config-eureka-provider",configuration = MyRule.class) // 配置 Ribbon 的负载均衡策略, name 属性用来设置服务提供方的应用名称; configuration 设置负载均衡的 Bean
public class SpringCloudConfigClientConsumerTest {
    public static void main(String[] args) {
        SpringApplication.run(SpringCloudConfigClientConsumerTest.class,args);
    }
}
